import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import FreePlayView from '../views/FreePlayView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/create',
    name: 'create',
    component: () => import('../views/CreateScore.vue')
  },
  {
    path: '/editor',
    name: 'editor',
    component: () => import('../views/EditorView.vue')
  },
  {
    path: '/help/:id',
    name: 'help-article',
    component: () => import('../views/HelpArticleView.vue')
  },
  {
    path: '/preview',
    name: 'preview',
    component: () => import('../views/PreviewView.vue')
  },
  {
    path: '/planning',
    name: 'planning',
    component: () => import('../views/PlanningView.vue')
  },
  {
    path: '/upload',
    name: 'upload',
    component: () => import('../views/UploadScore.vue')
  },
  {
    path: '/vip',
    name: 'vip',
    component: () => import('../views/VipView.vue')
  },
  {
    path: '/chord-dictionary',
    name: 'chord-dictionary',
    component: () => import('../views/ChordDictionary.vue')
  },
  {
    path: '/study-notes',
    name: 'study-notes',
    component: () => import('../views/StudyNotesView.vue')
  },
  {
    path: '/project-management',
    name: 'project-management',
    component: () => import('../views/ProjectManagement.vue')
  },
  {
    path: '/note-detail',
    name: 'note-detail',
    component: () => import('../views/NoteDetailView.vue')
  },
  {
    path: '/free-play',
    name: 'free-play',
    component: FreePlayView
  },
  {
    path: '/fingering-follow',
    name: 'fingering-follow',
    component: () => import('../views/FingeringFollowView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
